<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    .banner {
      width: 600px;
      height: 400px;
      border: 2px solid #333;
      border-radius: 10px;
      margin: 50px auto;
      position: relative;

      overflow: hidden;
    }

    /* ul */
    .banner > .imgBox {
      width: 500%;
      height: 100%;
      position: absolute;
      left: 0;
      top: 0;
      display: flex;
    }

    /* ul中的li */
    .banner > .imgBox > li {
      flex: 1;
      height: 100%;
      border-radius: 10px;
      overflow: hidden;
      display: flex;
      justify-content: center;
      align-items: center;
      color: #fff;
      font-size: 100px;
      font-weight: 700;
    }
    /* ol */
    .banner > .pointBox {
      width: 200px;
      height: 30px;
      background-color: rgba(255, 255, 255, .5);
      position: absolute;
      left: 50%;
      bottom: 30px;
      transform: translateX(-50%);
      border-radius: 15px;
      display: flex;
      justify-content: space-evenly;
      align-items: center;
    }

    .banner > .pointBox > li {
      width: 20px;
      height: 20px;
      background-color: #fff;
      border-radius: 50%;
      list-style: none;
      cursor: pointer;
    }

    .banner > .pointBox > li.active {
      background-color: red;
    }

    .banner > div {
      width: 30px;
      height: 50px;
      background-color: rgba(255, 255, 255, .3);
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      display: none;
      justify-content: center;
      align-items: center;
      font-size: 22px;
      color: #333;
      cursor: pointer;
    }

    .banner:hover > div {
      display: flex;
    }

    .banner > .left {
      left: 0;
      border-radius: 0 50px 50px 0;
    }

    .banner > .right {
      right: 0;
      border-radius: 50px 0 0 50px;
    }

    .banner > div:hover {
      background-color: rgba(255, 255, 255, .5);
    }
  </style>
</head>
<body>

  <!-- 左右切换轮播图 -->
  <!-- banner => 轮播图可视区域盒子 -->
  <div class="banner">
    <!-- 承载所有 li 的 图片大盒子 -->
    <ul class="imgBox">
      <li style="background-color: skyblue;">1</li>
      <li style="background-color: orange;">2</li>
      <li style="background-color: purple;">3</li>
      <li style="background-color: green;">4</li>
      <li style="background-color: pink;">5</li>
      <!-- <li style="background-color: yellow;">6</li> -->
    </ul>

    <!-- 承载所有焦点的 焦点大盒子 -->
    <ol class="pointBox">

    </ol>

    <!-- 左右切换的按钮 -->
    <div class="left">&lt;</div>
    <div class="right">&gt;</div>
  </div>

  <script src="./运动函数/utils.js"></script>
  <script src="./index.js"></script>
</body>
</html>
